package com.atguigu.gmall.product;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author lfy
 * @Description
 * @create 2023-08-14 16:18
 * SpringBoot默认会扫描 主程序类所在的包及其子包所有组件
 * 一般不要用 【@ComponentScan】： 禁用了默认扫描规则，只扫描你指定
 */
@EnableFeignClients(basePackages = "com.atguigu.gmall.feign.search")
@EnableTransactionManagement //开启基于注解的自动事务功能
@MapperScan(basePackages = "com.atguigu.gmall.product.mapper") //指定所有mapper接口路径
@SpringCloudApplication
public class ProductMainApplication {

    public static void main(String[] args) {
        SpringApplication.run(ProductMainApplication.class, args);
    }
}
